{% extends "base.html" %}
{% block style %}
<link rel="stylesheet" href="/site_media/view.css" type="text/css" />
{% endblock %}
{% block title %}View Jobs{% endblock %}
{% block head %}Sweet New Jobs!{% endblock %}
{% block content %}
	<div id='listings'>
		<table class="t">
				<tr>
					<th scope="col">Title</th>
					<th scope="col">Company</th>
					<th scope="col">Pay</th>
					<th scope="col">Description</th>
					<th scope="col">Last Modified</th>
					{% if user.is_authenticated %}
						<th scope="col">Add to Favorites</th>
					{% endif %}
					</tr>
			{% for entry in list %}
				<tr>
					<td>{{ entry.title }}</td>
					<td>{{ entry.company }}</td>
					<td>${{ entry.pay }}</td>
					<td>{{ entry.description|truncatewords:50 }}</td>
					<td>{{ entry.last_modified }}</td>
					{% if user.is_authenticated %}
						<td>
								<a href="/jobs/add/{{ entry.id }}/" >
									Add
								</a>
						</td>
					{% endif %}
				</tr>
			{% endfor %}
		</table>
	<form method="post" action="." enctype="multipart/form-data">
		{% csrf_token %}
		{{ form.as_p }}
		<input type="submit" value="Filter" />
	</form>

	</div>
{% endblock %}
